/*
 *接口编写处...
*如果接口需要做Action的权限验证，请在Action上使用属性
*如: [ApiActionPermission("equip_device",Enums.ActionPermissionOptions.Search)]
 */
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using VOL.Entity.DomainModels;
using MES.Equipment.IServices;

namespace MES.Equipment.Controllers
{
    public partial class equip_deviceController
    {
        private readonly Iequip_deviceService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;

        [ActivatorUtilitiesConstructor]
        public equip_deviceController(
            Iequip_deviceService service,
            IHttpContextAccessor httpContextAccessor
        )
        : base(service)
        {
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }


        /// <summary>
        /// 根据设备编号获取对应数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [HttpGet, Route("GetdeviceList")]
        public IActionResult GetdeviceList(string id)
        {
            var list = _service.GetdeviceList(id);
            return Ok(list);
        }
    }
}
